


import request from '@/axios';
import { baseUrl } from '@/config/env';

// 登录
export const login = (data) => request({
    url: baseUrl + '/personalCenter/loginUser',
    method: 'post',
    meta: {
        isToken: false
    },
    data
})

// 获取验证码
export const getCaptcha = () => request({
    url: baseUrl + '/commonUtil/captcha',
    method: 'get'
});
// 获取验证码
export const logout1 = (id) => request({
    url: baseUrl + `/personalCenter/logout/${id}`,
    method: 'get'
});
// 获取登录用户的菜单
export const getMenu = () => request({
    url: baseUrl + '/sysUser/menu',
    method: 'get'
});
// 获取登录用户的菜单
export const logList = (data) => request({
    url: baseUrl + '/log/logList',
    method: 'post',
    data
});

// 首页指标
export const infoNum = () => request({
    url: baseUrl + '/index/infoNum',
    method: 'get'
});
// 用户访问趋势-天
export const visitData = () => request({
    url: baseUrl + '/index/visit/date',
    method: 'get'
});
// 用户访问趋势-小时
export const visitDataHour = () => request({
    url: baseUrl + '/index/visit/hour',
    method: 'get'
});
// 用户增长趋势
export const typeNum = (type) => request({
    url: baseUrl + `/index/user/add/${type}`,
    method: 'get'
});